#include<stdio.h>

int main()

{

    char a[11] = {};

    int i, letter = 0, blank = 0, digit = 0, other = 0, c = 0;

    printf("Input 10 characters: ");

    for (i = 0;i < 10;i++) {

        scanf("%c", &a[i]);

        c = (int)a[i];

        if (c > 47 && c < 58)digit++;

        //else if(a[i]==' ')blank++;

        else if ((c > 96 && c < 123) || (c > 64 && c < 91))letter++;

        else if ((c > 32 && c < 48) || (c > 57 && c < 65))other++;

    }

    blank = 10 - letter - digit - other;

    printf("letter=%d,blank=%d,digit=%d,other=%d", letter, blank, digit, other);

    return 0;

}

?
